<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<?php
    include_once('db.php');
    
    $id_empleado = $_POST['no_empleado_b']

?>


<html >
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
        <title>Saade: Captura de facturas de clientes</title>
        <link rel="stylesheet" type="text/css" href="css/index.css" />
        <link rel="stylesheet" type="text/css" href="css/form.css" />  
        <link rel="stylesheet" href="css/example.css" TYPE="text/css" MEDIA="screen">
        <script type="text/javascript" src="js/bsn.AutoSuggest_c_2.0.js"></script>
        <script src="js/jquery-1.2.6.min.js" type="text/javascript"></script>
        <script type="text/javascript" src="js/tabber.js"></script>
        <script type="text/javascript">

            /* Optional: Temporarily hide the "tabber" class so it does not "flash"
            on the page as plain HTML. After tabber runs, the class is changed
            to "tabberlive" and it will appear. */

            document.write('<style type="text/css">.tabber{display:none;}<\/style>');
        </script>
        <script>
            function cerrar()
            {
                parent.$.fancybox.close();
            }
        </script>
        <script>
            function cerrar()
            {
                parent.$.fancybox.close();
            }

            function validar(){
                if (confirm("Seguro que quiere eliminar el servicio?")) {
                    // Respuesta afirmativa...
                    return true;
                }else{
                    return false;
                }   
            }
        </script>
        <script type="text/javascript" src="js/jquery.tools.min.js"></script>

    </head>
    <body style="margin: 0px; padding: 0px;" >
        <div class="header_fancy">
            <div class="cerrar_fancy" onclick="cerrar();"></div> 
            <p style="margin-left: 23px; padding-top: 20px; margin-top:0px">EDITAR SERVICIO</p>

        </div>
        <br><br><br>
        <table id="forma" width="750" align="center">
        <tr>
        <td width="250"><span class="input_fancy2" style="text-decoration: underline;">Nombre</span></td>
        <td width="250"><span class="input_fancy2" style="text-decoration: underline;">Empresa</span></td>
        <td width="100"><span class="input_fancy2" style="text-decoration: underline;">Fecha</span></td>
        <td width="80"><span class="input_fancy2" style="text-decoration: underline;">Total</span></td>
        <td width="23"></td>
        </tr>
            <?php
                $result2 = mysql_query("select a.id_factura_cliente, concat(b.nombre, ' ', b.ap_paterno,' ', b.ap_materno) as nombre_empleado, c.nombre as nombre_empresa, a.fecha, a.total from factura_cliente a join clientes b ON a.no_empleado = b.no_empleado join empresa c ON b.id_empresa = c.id_empresa where a.calculado <> 'x' and a.no_empleado = '$id_empleado' order by a.id_factura_cliente desc limit 10");
                while ($row2 = mysql_fetch_array($result2)) {
                  echo  '<tr>';
                  echo '<td><span class="input_fancy2">'. $row2['nombre_empleado'] .'</span></td>';
                  echo '<td><span class="input_fancy2">'. $row2['nombre_empresa'] .'</span></td>'; 
                  echo '<td><span class="input_fancy2">'. $row2['fecha'] .'</span></td>';
                  echo '<td><span class="input_fancy2">$'. number_format($row2['total'],2) .'</span></td>';     
                  echo '<td><a href="editar_servicio_procesa.php?s='.$row2['id_factura_cliente'].'" onclick="return validar();"><img src="img/todo/borrar.png" border="0" width="23" height="18"></a></td>';                   
                  echo '</tr>';
                } 
            ?>
             
        </table>
        
        <script>
            $("#ingrediente").validator();
        </script>
    </body>
</html>
